package com.example.rabbitmqbootconsumer.dto;

import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.UUID;

/**
 * 消息体
 *
 * @author 伯路平
 * @since 2023/6/19
 **/
@Builder
@Data
public class MessageDTO implements Serializable {
    private static final long serialVersionUID = 312856843559444822L;

    /**
     * 消息id
     */
    @Builder.Default
    private String messageId = String.valueOf(UUID.randomUUID());

    /**
     * 消息内容
     */
    @NotBlank(message = "消息内容不能为空")
    private String messageData;
}
